home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbaseiv.zip / P4DOS007.TIP < prev    next >
Text File  |  1991-12-16  |  3KB  |  78 lines

  1. My computer, like many others, uses two sizes of floppy
  2. disks. Drive A: is for 5 1/4-inch disks and drive B: for 3
  3. 1/2-inch disks. In the past, every time I needed to format
  4. disks, I had to reach for the DOS manual to find the right
  5. command-line switches for, say, a 720K disk in drive B:.
  6.  
  7. To simplify matters, I wrote the batch file FORMAT.BAT [see
  8. listing]. To use it, rename your formatting program (for
  9. instance, the DOS program FORMAT.COM or the PC Tools
  10. PCFORMAT program) to FORMAT!.COM. Then freely format
  11. floppies with the commands FORMAT 360, FORMAT 12, FORMAT
  12. 720, or FORMAT 144.
  13.  
  14. Ed Quillen
  15. Salida, Colorado
  16.  
  17. Editor's note: I like this solution better than others I've
  18. seen, many of which are prone to errors. It also has a nice
  19. (possibly unintended) side effect: it makes it tougher to
  20. accidentally reformat your hard disk. (You must type
  21. FORMAT!, or whatever name you gave the original FORMAT.COM
  22. program, to do that.)
  23.  
  24. Use the Alt-F command to save the listing below as
  25. FORMAT.BAT in a directory on your path so you can use it
  26. from inside any directory. Then modify the drive letters in
  27. the batch file, if necessary, to correspond to your
  28. configuration. (If your system doesn't support all four
  29. kinds of disks, you may want to add error messages for
  30. unsupported sizes.) Finally, rename DOS's FORMAT.COM command
  31. to FORMAT!.COM, so that the batch file will always get
  32. control of the formatting process.
  33.  
  34. Postscript: Since we printed this tip, MS-DOS 5.0 was
  35. released -- and, ironically, its FORMAT program  contains
  36. an /F:size switch that works almost exactly like this batch.
  37. Thus, this batch is useful primarily for users who haven't
  38. upgraded to DOS 5.
  39.  
  40.  
  41. FORMAT.BAT: This intelligent floppy formatting batch file
  42. can make formatting a floppy as easy as mentioning its
  43. intended capacity.
  44.  
  45. ---- BEGIN LISTING ----
  46. @ECHO OFF
  47. REM FORMAT.BAT
  48. REM  Rename DOS FORMAT.COM to FORMAT!.COM
  49. IF NOT "%1"=="" GOTO %1
  50.  
  51. :HELP
  52. ECHO You must specify what type of disk you want to format.
  53. ECHO FORMAT 360 will produce a 360-kb disk in drive A:
  54. ECHO FORMAT 12 will produce a 1.2-mb disk in drive A:
  55. ECHO FORMAT 720 will produce a 720-kb disk in drive B:
  56. ECHO FORMAT 144 will produce a 1.44-mb disk in drive B:
  57. GOTO DONE
  58.  
  59. :360
  60. C:\DOS\FORMAT! A: /N:09 /T:40 %2 %3 %4
  61. GOTO DONE
  62. :12
  63. C:\DOS\FORMAT! A: /N:15 /T:80 %2 %3 %4
  64. GOTO DONE
  65. :720
  66. C:\DOS\FORMAT! B: /N:09 /T:80 %2 %3 %4
  67. GOTO DONE
  68. :144
  69. C:\DOS\FORMAT! B: /N:18 /T:80 %2 %3 %4
  70. :DONE
  71. ---- END LISTING ----
  72.  
  73. Title: Fancy Floppy Formatter
  74. Category: DOS
  75. Issue date: Jul 1991
  76. Editor: Brett Glass
  77. Supplementary files: NONE
  78.